<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="basePath" value="${pageContext.request.contextPath}" scope="application" />
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>帮助</title>
    <link rel="stylesheet" href="${basePath}/static/help/css/css.css">
    <script src="${basePath}/static/help/js/jquery.min.js"></script>
</head>
<body>
<div class="container">
    <div class="helpBox">
        <div class="title">${obj.title }</div>
        <c:forEach items="${comlist }" var="item" varStatus="c">
        	<div class="content">
	            <div class="listBtn box" ref="${item.id }">
	                <div class="flex1 txt">${item.title }</div>
	                <img src="${basePath}/static/help/images/updown_03.png" alt="">
	            </div>
	            <div class="detail">
	            	${item.content }
	            </div>
	        </div>
        </c:forEach>
    </div>
</div>
<script>
    $( document ).ready(function () {
        $('.listBtn').on('click',function () {
            $('.content').removeClass('on')
            $('.content').find('img').attr('src','${basePath}/static/help/images/updown_03.png')

            $(this).parent().addClass('on')
            $(this).find('img').attr('src','${basePath}/static/help/images/updown_06.png')
            var ref = $(this).attr("ref");
            //点击量加一
            $.post("${basePath}/help/click", {"id" : ref}, function(d) {
            	console.log(d)
    		});
        })

    })
</script>
</body>
</html>